import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/workflow/process/getList',
    method: 'post',
    data: query
  })
}

export function fetchArticle(processID) {
  return request({
    url: '/workflow/process/getInfo',
    method: 'post',
    data: {
      'process_identity': processID
    }
  })
}

export function removeProcessByID(processID) {
  return request({
    url: '/workflow/process/delete',
    method: 'post',
    data: {
      'process_identity': processID
    }
  })
}

export function createArticle(data) {
  return request({
    url: '/workflow/process/save',
    method: 'post',
    data
  })
}

export function updateArticle(data) {
  return request({
    url: '/workflow/process/save',
    method: 'post',
    data
  })
}
